package rnavigator.model;

/**
 * @author Elias la Cour
 * Baseclass stores info on position in the nucleotide chain, nucleotide stored,
 * if nucleotide is part of a knot or pseudoknot, and position of the other end of the knot
 * field
 */
public class Base extends Coord2D {

    private int position = -1;
    private int mate = -1;
    private String nucleotide;
    private boolean pseudoKnot = false;
    private boolean knot = false;

    public Base() {
    }

    /**
     * @param position determines position in the nucleotide chain
     * @param nucleotide should be A, C, G, U, 3 or 5
     */
    public Base(String nucleotide, int position) {
        this.nucleotide = nucleotide;
        this.position = position;
    }
    
    Base(String nucleotide, int position, int mate){
        this(nucleotide,position);
        this.mate=mate;
    }
    
    /**
     * @return the position
     */
    public int getPosition() {
        return position;
    }

    /**
     * @param position the position to set
     */
    public void setPosition(int position) {
        this.position = position;
    }

    /**
     * @return the mate
     */
    public int getMate() {
        return mate;
    }

    /**
     * @param mate the mate to set
     */
    public void setMate(int mate) {
        this.mate = mate;
    }

    /**
     * @return the nucleotide
     */
    public String getNucleotide() {
        return nucleotide;
    }

    /**
     * @param nucleotide the nucleotide to set
     */
    public void setNucleotide(String nucleotide) {
        this.nucleotide = nucleotide;
    }

    /**
     * @return the pseudoKnot
     */
    public boolean isPseudoKnot() {
        return pseudoKnot;
    }

    /**
     * @param pseudoKnot the pseudoKnot to set
     */
    public void setPseudoKnot(boolean pseudoKnot) {
        this.pseudoKnot = pseudoKnot;
    }

    /**
     * @return the knot
     */
    public boolean isKnot() {
        return knot;
    }

    /**
     * @param knot the knot to set
     */
    public void setKnot(boolean knot) {
        this.knot = knot;
    }
    
    /**
     * @return returns the Coord2D object (x & y coordinates) of this object
     */
    public Coord2D getCoord2D(){
        return this;
    }
}
